package com.allwees.bs.c.module.user.dto;

import com.allwees.bs.c.module.product.dto.ProductDetailsDTO;
import com.allwees.bs.c.module.user.entity.ProductCollectionEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel
public class ProductCollectionDto implements Serializable {
	private static final long serialVersionUID = -362677469448798451L;
	//	@ApiModelProperty(value = "商品实体")
	private ProductDetailsDTO productDto;

//	@ApiModelProperty(value = "创建时间即收藏时间")
	private Date createdAt;

	public ProductCollectionDto(ProductDetailsDTO detailsDTO, ProductCollectionEntity entity) {
		this.productDto = detailsDTO;
		this.createdAt = entity.getCreatedAt();
	}
}
